<!-- 会员提现申请表表单弹窗 -->
<form id="membercashapply-form" lay-filter="membercashapply-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="id" type="hidden"/>
    				    <div class="layui-form-item">
        <label class="layui-form-label">会员ID</label>
        <div class="layui-input-block">
            <input name="memberId" placeholder="请输入会员ID" type="text" class="layui-input" maxlength="20"  id="memberId"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">审核人</label>
        <div class="layui-input-block">
            <input name="checkUserId" placeholder="请输入审核人ID" type="hidden" class="layui-input" maxlength="20"  id="checkUserId"
                   lay-verify="required" />
            <input name="checkUsername" placeholder="请输入审核人" readonly type="text" class="layui-input" maxlength="20"  id="checkUsername"
                   lay-verify="required" />
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">转账人ID</label>
        <div class="layui-input-block">
            <input name="cashUserId" placeholder="请输入转账人ID" type="hidden" class="layui-input" maxlength="20"  id="cashUserId"
                   lay-verify="required" />
            <input name="cashUsername" placeholder="请输入转账人" readonly type="text" class="layui-input" maxlength="20"  id="cashUsername"
                   lay-verify="required" />
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">申请人</label>
        <div class="layui-input-block">
            <input name="applyUserId" placeholder="请输入申请人ID" type="hidden" class="layui-input" maxlength="20"  id="applyUserId"
                   lay-verify="required" required/>.
            <input name="applyUsername" placeholder="请输入申请人" type="text" class="layui-input" maxlength="20"  id="applyUsername"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">转账金额</label>
        <div class="layui-input-block">
            <input name="cashAmount" placeholder="请输入转账金额" type="text" class="layui-input" maxlength="20"  id="cashAmount"
                   lay-verify="required"  readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">手续费</label>
        <div class="layui-input-block">
            <input name="chargeFee" placeholder="请输入手续费" type="text" class="layui-input" maxlength="20"  id="chargeFee"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">实际到账</label>
        <div class="layui-input-block">
            <input name="actualAmount" placeholder="请输入实际到账" type="text" class="layui-input" maxlength="20"  id="actualAmount"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input name="status" placeholder="请输入状态，1-待审核，2-已审核，3-已转帐， -1-驳回" type="hidden" class="layui-input" maxlength="20"  id="status"
                   lay-verify="required" required/>
            <input name="strStatus" placeholder="请输入状态" type="text" class="layui-input" maxlength="20"  id="strStatus"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">提现方式</label>
        <div class="layui-input-block">
            <input name="cashStyle" placeholder="请输入提现方式，1-线下，2-到微信钱包，3-到银行卡" type="hidden" class="layui-input" maxlength="20"  id="cashStyle"
                   lay-verify="required" required/>
            <input name="strCashStyle" type="text" class="layui-input" maxlength="20"  id="strCashStyle"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">说明</label>
        <div class="layui-input-block">
            <input name="description" placeholder="请输入说明" type="text" class="layui-input" maxlength="20"  id="description"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input name="createDate" placeholder="请输入创建时间" type="text" class="layui-input" maxlength="20"  id="createDate"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">审核时间</label>
        <div class="layui-input-block">
            <input name="checkDate" placeholder="请输入审核时间" type="text" class="layui-input" maxlength="20"  id="checkDate"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">转账时间</label>
        <div class="layui-input-block">
            <input name="cashDate" placeholder="请输入转账时间" type="text" class="layui-input" maxlength="20"  id="cashDate"
                   lay-verify="required" readonly required/>
        </div>
    </div>
     <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <!--<button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>-->
    </div>
</form>

<script>
    layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var formSelects = layui.formSelects;
 
        var membercashapply = admin.getTempData('t_membercashapply');
           if (membercashapply.method=="update"){
               if(membercashapply.status==1){
                   membercashapply.strStatus='待审核';
               }else if(membercashapply.status==2){
                   membercashapply.strStatus='已审核';
               }else if(membercashapply.status==3){
                   membercashapply.strStatus='已转帐';
               }else if(membercashapply.status==-1){
                   membercashapply.strStatus='驳回';
               }
               if(membercashapply.cashStyle==1){
                   membercashapply.strCashStyle="线下支付";
               }else if(membercashapply.cashStyle==2){
                   membercashapply.strCashStyle="微信钱包";
               }else if(membercashapply.cashStyle==3){
                   membercashapply.strCashStyle="到银行卡";
               }
        	form.val('membercashapply-form', membercashapply);
            form.render();
        }
        // 表单提交事件
        form.on('submit(user-form-submit)', function (data) {
             layer.load(2);
            
            admin.req('member/membercashapply/'+membercashapply.method, JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "post");  
            return false;
        });
    });
</script>
